<?php
defined('_JEXEC') or die('Restricted access');
$auc_id = JRequest::getVar('auc_id');
$db = JFactory::getDBO();
$query = "SELECT a.*, u.name, u.email FROM #__auction_auto as a LEFT JOIN #__users as u ON a.user_id = u.id WHERE a.auc_id = ". $auc_id ." ORDER BY a.id";
$db->setQuery($query);
$aucs = $db->loadObjectList();
?>
<style>
.pro_name_more {
    color: #B60800;
    font-size: 12px;
    font-weight: bold;
	border-bottom: 1px dotted #999999;
	padding: 5px 0 5px 5px;
}
.tbHistory td{
	border:solid #999 1px;
	border-bottom:none;
	border-left:none;
	text-align:center;
}

.tbHead td{
	background-color:#CCC;
	font-weight:bold;
}
</style>
<div class="pro_name_more"><strong>Max. Autobid</strong>:</div>
<table width="550" align="center" class="tbHistory" style="border-bottom:solid #999 1px;">
	<tr class="tbHead">
    	<td align="center">#</td>
        <td align="center">Name</td>
        <td align="center">Email</td>
        <td align="center">Max price</td>
    </tr>
    <?php $i = 1;	
	foreach($aucs as $auc){
	?>
    <tr>
    	<td align="center"><?php echo $i;?></td>
        <td align="center"><?php echo $auc->name;?></td>
        <td align="center"><?php echo $auc->email;?></td>
        <td align="center"><?php echo number_format($auc->max_price,0,',','.');?>,- DKK</td>
    </tr>
    <?php $i++;}?>
</table>